#include <iostream>
using namespace std;
int main(){
    int n,a,b;
    cin>>n;
    cin>>a>>b;
    double jiwei=b*1.0/a;
    for(int i=1;i<n;i++){
        cin>>a>>b;
        double newfa=b*1.0/a;
        if (newfa-jiwei>0.05)
            cout<<"better"<<endl;
        else if (jiwei-newfa>0.05)
            cout<<"worse"<<endl;
        else 
            cout<<"same"<<endl;
    }
}